﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Domotica.Gazing.Calibration
{
    public partial class CalibrationForm : Form
    {
        public CalibrationForm()
        {
            InitializeComponent();
        }

        public void SetTopText(string text)
        {
            if (lblTop.InvokeRequired)
            {
                lblTop.Invoke(new SetText(SetTopText), new object[]{text});
            }
            else
            {
                lblTop.Text = text;
            }
        }

        public void SetMiddleText(string text)
        {
            if (lblMiddle.InvokeRequired)
            {
                lblMiddle.Invoke(new SetText(SetMiddleText), new object[] { text });
            }
            else
            {
                lblMiddle.Text = text;
            }
        }

        public void SetBottomText(string text)
        {
            if (lblBottom.InvokeRequired)
            {
                lblBottom.Invoke(new SetText(SetBottomText), new object[] { text });
            }
            else
            {
                lblBottom.Text = text;
            }
        }

        private delegate void SetText(string text);
    }
}
